/**
 * @param token 设置token
 * @description 保存token到localStorage
 */
const setToken = (token: string) => {
  localStorage.setItem('token', token)
}

/**
 * @returns token
 * @description 获取token
 */
const getToken = () => {
  return localStorage.getItem('token') || ''
}

/**
 * @description 清除token
 */
const clearToken = () => {
  localStorage.removeItem('token')
}

export { setToken, getToken, clearToken }
